// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

import {themes as prismThemes} from 'prism-react-renderer';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';

/** @type {import('@docusaurus/types').Config} */
const config = {
  title: 'KiwiDB 存储引擎',
  tagline: '由社区驱动开发的强一致性开源存储引擎',
  favicon: 'img/favicon.ico',

  // Set the production url of your site here
  url: 'https://zouxiangneihe.atomgit.net/',
  // Set the /<baseUrl>/ pathname under which your site is served
  // For GitHub pages deployment, it is often '/<projectName>/'
  baseUrl: '/KiwiDB_Complete_Website/',

  // GitHub pages deployment config.
  // If you aren't using GitHub pages, you don't need these.
  organizationName: 'KiwiDB Community', // Usually your GitHub org/user name.
  projectName: 'KiwiDB 开源存储引擎', // Usually your repo name.

  onBrokenLinks: 'throw',
  onBrokenMarkdownLinks: 'warn',

  // Even if you don't use internationalization, you can use this field to set
  // useful metadata like html lang. For example, if your site is Chinese, you
  // may want to replace "en" with "zh-Hans".
  i18n: {
    defaultLocale: 'zh-Hans',
    locales: ['zh-Hans'],
  },

  presets: [
    [
      'classic',
      /** @type {import('@docusaurus/preset-classic').Options} */
      ({
        docs: {
          sidebarPath: './sidebars.js',
          // Please change this to your repo.
          // Remove this to remove the "edit this page" links.
          editUrl:
            'https://atomgit.com/zouxiangneihe/KiwiDB/tree/master',
            remarkPlugins: [remarkMath],
            rehypePlugins: [rehypeKatex],
          },
        theme: {
          customCss: './src/css/custom.css',
        },
      }),
    ],
  ],
  stylesheets: [
    {
      href: '/css/katex.min.css',
      type: 'text/css',
    },
  ],

  themeConfig:
    /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
    ({
      // Replace with your project's social card
      image: 'img/docusaurus-social-card.jpg',
      navbar: {
        title: 'KiwiDB',
        logo: {
          alt: 'Logo',
          src: 'img/logo.svg',
        },
        items: [
        ],
      },
      footer: {
        style: 'dark',
        links: [
          {
            title: '社区',
            items: [
              {
                label: '开放原子 数据促进社区',
                href: 'https://datapromoto.atomgit.com/',
              },
            ],
          },
          {
            title: '代码仓库',
            items: [
              {
                label: 'KiwiDB 仓库',
                href: 'https://github.com/arana-db/kiwi',
              },
            ],
          },
        ],
        copyright: `Copyright © ${new Date().getFullYear()} KiwiDB 社区`,
      },
      prism: {
        theme: prismThemes.github,
        darkTheme: prismThemes.dracula,
      },
    }),
};

export default config;
